
<p><b>Syntax:</b> <i>error_log file [ debug | info | notice | warn | error | crit ] </i>
</p><p><b>Default:</b> <i>${prefix}/logs/error.log</i>
</p><p>Specifies the file where server (and fastcgi) errors are logged.
</p><p>Default values for the error level:
</p>
<ol><li>  in the main section - <code>error</code>
</li><li>  in the HTTP section - <code>crit</code>
</li><li>  in the server section - <code>crit</code>
</li></ol>
<p>Nginx supports separate error logging per virtual host. This is a unique feature, which lighttpd refuses to implement. For an example of separate error logging per server, see SeparateErrorLoggingPerVirtualHost and this mailing list thread on separating error logging per virtual host.
</p><p>If you've built Nginx with <code>--with-debug</code>, you may also use:
</p>
<pre class="code"><span class="kw1">error_log</span> LOGFILE <span class="br0">&#91;</span>debug_core | debug_alloc | debug_mutex | debug_event | debug_http | debug_imap<span class="br0">&#93;</span>;</pre>
<p>Note that <code>error_log off</code> does not disable logging - the log will be written a file named "off". To disable logging, you may use:
</p>
<pre class="code"><span class="kw1">error_log</span> /dev/null crit;</pre>
<br><i>Module: NginxHttpMainModule</i>